home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / Help / Help Files / Constraints / Un+Une=Deux < prev   
Text File  |  1994-06-24  |  367b  |  24 lines

  1. ;cryptarithmetics: UN+UNE=DEUX
  2. (c)
  3.  
  4. ;;; Variables
  5. (n e x r0 u r1 d)
  6.  
  7. ;;; Constraints
  8. ((=? (+ n e) (+ x (* 10 r0)))
  9.  (=? (+ r0 u n) (+ u (* 10 r1)))
  10.  (=? (+ r1 u) (+ e (* 10 d)))
  11.  (<>? n e) (<>? n x) (<>? n u)
  12.  (<>? n d) (<>? e x) (<>? e u)
  13.  (<>? e d) (<>? x u) (<>? x d)
  14.  (<>? u d)) 
  15.  
  16. ;;; Domains
  17. ((0 1 2 3)
  18.  (0 1 2 3)
  19.  (0 1 2 3)
  20.  (0 1)
  21.  (0 1 2 3)
  22.  (0 1)
  23.  (0 1 2 3))
  24.